class MinStack {
    constructor() {
        this.stack = []
    }
    push(item) {
        this.stack.push(item)
    }
    pop() {
        return this.stack.pop()
    }
    top() {
        return this.stack[this.stack.length - 1]
    }
    min() {
        return Math.min.apply(null, this.stack)
    }
}
const m = new MinStack()